package com.cskaoyan.vo.wxorder;

import com.cskaoyan.bean.wxcart.HandleOptionBean;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class OrderDetailVo {

    /**
     * orderInfo : {"consignee":"刘师傅","address":"湖北省 武汉市 洪山区 花山街道软件新城2期","addTime":"2021-04-13 16:37:05","orderSn":"20210413245804","actualPrice":899,"mobile":"18675730010","orderStatusText":"已取消(系统)","goodsPrice":899,"couponPrice":0,"id":22,"freightPrice":0,"handleOption":{"cancel":false,"delete":true,"pay":false,"comment":false,"confirm":false,"refund":false,"rebuy":false}}
     * orderGoods : [{"id":22,"orderId":22,"goodsId":1006002,"goodsName":"轻奢纯棉刺绣水洗四件套","goodsSn":"1006002","productId":7,"number":1,"price":899,"specifications":["标准"],"picUrl":"http://yanxuan.nosdn.127.net/8ab2d3287af0cefa2cc539e40600621d.png","comment":0,"addTime":"2021-04-13 16:37:05","updateTime":"2021-04-13 16:37:05","deleted":false}]
     */

    private OrderInfoBean orderInfo;
    private List<OrderGoodsBean> orderGoods;

    public OrderInfoBean getOrderInfo() {
        return orderInfo;
    }

    public void setOrderInfo(OrderInfoBean orderInfo) {
        this.orderInfo = orderInfo;
    }

    public List<OrderGoodsBean> getOrderGoods() {
        return orderGoods;
    }

    public void setOrderGoods(List<OrderGoodsBean> orderGoods) {
        this.orderGoods = orderGoods;
    }

    public static class OrderInfoBean {
        /**
         * consignee : 刘师傅
         * address : 湖北省 武汉市 洪山区 花山街道软件新城2期
         * addTime : 2021-04-13 16:37:05
         * orderSn : 20210413245804
         * actualPrice : 899.0
         * mobile : 18675730010
         * orderStatusText : 已取消(系统)
         * goodsPrice : 899.0
         * couponPrice : 0.0
         * id : 22
         * freightPrice : 0.0
         * handleOption : {"cancel":false,"delete":true,"pay":false,"comment":false,"confirm":false,"refund":false,"rebuy":false}
         */

        private String consignee;
        private String address;
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date addTime;
        private String orderSn;
        private BigDecimal actualPrice;
        private String mobile;
        private String orderStatusText;
        private BigDecimal goodsPrice;
        private BigDecimal couponPrice;
        private int id;
        private BigDecimal freightPrice;
        private HandleOptionBean handleOption;

        public String getConsignee() {
            return consignee;
        }

        public void setConsignee(String consignee) {
            this.consignee = consignee;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public Date getAddTime() {
            return addTime;
        }

        public void setAddTime(Date addTime) {
            this.addTime = addTime;
        }

        public String getOrderSn() {
            return orderSn;
        }

        public void setOrderSn(String orderSn) {
            this.orderSn = orderSn;
        }

        public BigDecimal getActualPrice() {
            return actualPrice;
        }

        public void setActualPrice(BigDecimal actualPrice) {
            this.actualPrice = actualPrice;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getOrderStatusText() {
            return orderStatusText;
        }

        public void setOrderStatusText(Integer orderStatus) {
            if (101 == orderStatus)
                this.orderStatusText = "未付款";
            else if (201 == orderStatus)
                this.orderStatusText = "待发货";
            else if (301 == orderStatus)
                this.orderStatusText = "待收货";
            else if (401 == orderStatus)
                this.orderStatusText = "待评价";
            else if (103 == orderStatus)
                this.orderStatusText = "已取消(系统)";
            else if (202 == orderStatus)
                this.orderStatusText = "订单取消，退款中";
            else if (102 == orderStatus)
                this.orderStatusText = "已取消";
            else if (203 == orderStatus)
                this.orderStatusText = "已退款";
            else if (402 == orderStatus)
                this.orderStatusText = "已收货(系统)";
            else if (501 == orderStatus)
                this.orderStatusText = "已完成";
        }

        public BigDecimal getGoodsPrice() {
            return goodsPrice;
        }

        public void setGoodsPrice(BigDecimal goodsPrice) {
            this.goodsPrice = goodsPrice;
        }

        public BigDecimal getCouponPrice() {
            return couponPrice;
        }

        public void setCouponPrice(BigDecimal couponPrice) {
            this.couponPrice = couponPrice;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public BigDecimal getFreightPrice() {
            return freightPrice;
        }

        public void setFreightPrice(BigDecimal freightPrice) {
            this.freightPrice = freightPrice;
        }

        public HandleOptionBean getHandleOption() {
            return handleOption;
        }

        public void setHandleOption(HandleOptionBean handleOption) {
            this.handleOption = handleOption;
        }
    }

    public static class OrderGoodsBean {
        /**
         * id : 22
         * orderId : 22
         * goodsId : 1006002
         * goodsName : 轻奢纯棉刺绣水洗四件套
         * goodsSn : 1006002
         * productId : 7
         * number : 1
         * price : 899.0
         * specifications : ["标准"]
         * picUrl : http://yanxuan.nosdn.127.net/8ab2d3287af0cefa2cc539e40600621d.png
         * comment : 0
         * addTime : 2021-04-13 16:37:05
         * updateTime : 2021-04-13 16:37:05
         * deleted : false
         */

        private int id;
        private int orderId;
        private int goodsId;
        private String goodsName;
        private String goodsSn;
        private int productId;
        private int number;
        private BigDecimal price;
        private String picUrl;
        private int comment;
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date addTime;
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date updateTime;
        private boolean deleted;
        private String[]  specifications;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getOrderId() {
            return orderId;
        }

        public void setOrderId(int orderId) {
            this.orderId = orderId;
        }

        public int getGoodsId() {
            return goodsId;
        }

        public void setGoodsId(int goodsId) {
            this.goodsId = goodsId;
        }

        public String getGoodsName() {
            return goodsName;
        }

        public void setGoodsName(String goodsName) {
            this.goodsName = goodsName;
        }

        public String getGoodsSn() {
            return goodsSn;
        }

        public void setGoodsSn(String goodsSn) {
            this.goodsSn = goodsSn;
        }

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public int getNumber() {
            return number;
        }

        public void setNumber(int number) {
            this.number = number;
        }

        public BigDecimal getPrice() {
            return price;
        }

        public void setPrice(BigDecimal price) {
            this.price = price;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        public int getComment() {
            return comment;
        }

        public void setComment(int comment) {
            this.comment = comment;
        }

        public Date getAddTime() {
            return addTime;
        }

        public void setAddTime(Date addTime) {
            this.addTime = addTime;
        }

        public Date getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
        }

        public boolean isDeleted() {
            return deleted;
        }

        public void setDeleted(boolean deleted) {
            this.deleted = deleted;
        }

        public String[] getSpecifications() {
            return specifications;
        }

        public void setSpecifications(String[] specifications) {
            this.specifications = specifications;
        }
    }
}
